/*
 * Copyright 2021 Muii
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.gitee.muii.echarts.tooltip;

import java.io.Serializable;

import com.gitee.muii.echarts.textstyle.BaseTextStyle;
import com.gitee.muii.echarts.tooltip.position.Str;
import com.gitee.muii.echarts.tooltip.position.Type;

import lombok.Data;

@Data
public class BaseTooltip implements Serializable {

    private static final long serialVersionUID = 2116417883654924634L;

    private Object position;
    private Object formatter;
    private String backgroundColor;
    private String borderColor;
    private Number borderWidth;
    private Object padding;
    private BaseTextStyle textStyle;
    private String extraCssText;

    public void setPosition(Str position) {
        this.position = position.value();
    }

    public void setPosition(Type position) {
        this.position = position;
    }

    public void setPosition(Double[] position) {
        this.position = position;
    }

    public void setPosition(String[] position) {
        this.position = position;
    }

    public void setFormatter(String formatter) {
        this.formatter = formatter;
    }

    public void setPadding(Number padding) {
        this.padding = padding;
    }

    public void setPadding(Number[] padding) {
        this.padding = padding;
    }

}
